USE [master];
GO
ALTER DATABASE SQLAuthority
SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO
ALTER DATABASE SQLAuthority SET OFFLINE
GO
GO
ALTER DATABASE SQLAuthority
SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO
ALTER DATABASE SQLAuthority SET OFFLINE
GO
تغییر نام فایل:
ALTER DATABASE SQLAuthority
MODIFY FILE (Name='SQLAuthority_Logs', FILENAME='D:\SQLAuthority_Logs.ldf')
GO
MODIFY FILE (Name='SQLAuthority_Logs', FILENAME='D:\SQLAuthority_Logs.ldf')
GO
مجددا دیتابیس را آنلاین نمایید:
USE [master];
GO
ALTER DATABASE SQLAuthority SET ONLINE
Go
ALTER DATABASE SQLAuthority SET MULTI_USER
GO
GO
ALTER DATABASE SQLAuthority SET ONLINE
Go
ALTER DATABASE SQLAuthority SET MULTI_USER
GO